2 * Copyright (c) 2005 David Kocher. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * Bug fixes, suggestions and comments should be sent to:
16 * dkocher@cyberduck.ch
19 #include <CoreFoundation/CoreFoundation.h>
20 #include <CoreServices/CoreServices.h>
22 #import <Cocoa/Cocoa.h>
24 Boolean GetMetadataForFile(void* thisInterface,
25 CFMutableDictionaryRef attributes,
26 CFStringRef contentTypeUTI,
29 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
30 NSDictionary *bookmark = [NSDictionary dictionaryWithContentsOfFile:(NSString *)file];
33 if(nil != [bookmark objectForKey:@"Hostname"]) {
34 [(NSMutableDictionary *)attributes setObject:[bookmark objectForKey:@"Hostname"]
35 forKey:@"ch_sudo_cyberduck_hostname"];
37 if(nil != [bookmark objectForKey:@"Nickname"]) {
38 [(NSMutableDictionary *)attributes setObject:[bookmark objectForKey:@"Nickname"]
39 forKey:@"ch_sudo_cyberduck_nickname"];